<?php
/*
 *  A Part of snock project
 *   Author king-of-war
 * Last modified 2009-4-22
 *
 */
 @session_start();
 $root_path='../';
 include_once $root_path . 'admin/smarty_config.php';
include_once $root_path . 'admin/class/guest.class.php';
include_once $root_path . 'admin/class/cfg.class.php';
include_once $root_path.'admin/class/error.class.php';
/*
 *
 * check identify
 */
include_once $root_path.'admin/class/verify.class.php';
$a=new verify($root_path);
$a->identity_check(3);
/*
 *
 * check id
 */

$error=new Errmsg();
$id='';
if($_GET['id']!=''){
$id=$_GET['id'];
}else{
$info='请选择要回复的留言';
$error->error_chinese($info);
exit;
}
/*
 * get the comment of guests
 */
 $info='留言删除';

 $guest=new guest($root_path);



$guests=$guest->guest_read($id,1);


/*
 * guest delete moudle
 */

if (isset($_POST['Submit'])) {

$replay=$_POST['replay'];
 $line=$guest->guest_add($id,'','','',$replay,'',0);

if($line){
	$info= '回复成功';
}else{
	$info=  '回复失败';
};
}



/*
 *  set template
 *
 */
$smarty->assign("info",$info);
$smarty->assign("guests", $guests);

$smarty->display("guest_replay.html");

?>


